﻿﻿using UnityEngine;

namespace Yoozoo.Mars.Got.SpriteAnim
{
    public class SpriteVisitor: AnimSprite,IMemoryPoolInterface
    {
        private int m_visitKey = 0;
        public SpriteVisitor(AnimSpriteCreator m_SystemNode, int visitKey)
        :base(m_SystemNode)
        {
            m_visitKey = visitKey;
        }

        public SpriteVisitor()
        : base()
        {

        }

        public void SetSystemNode_v(AnimSpriteCreator m_SystemNode, int visitKey)
        {
            this.SetSystemNode(m_SystemNode);
            m_visitKey = visitKey;
        }

        public bool CheckVisitAuthority(int visitKey)
        {
            if (m_visitKey == visitKey)
            {
                return true;
            }
            else
            {
                if (Debug.unityLogger.logEnabled) { Debug.LogError("非法VIsitor！！！！！"); }
            }
            return false;
        }
        public void Dispose_v()
        {
            this.Dispose();
        }
    }
}
